package com.ny.demo;

public class Test {
    public static void main(String[] args) {
        Dog dog = new Dog("旺财", 3);
        System.out.println("狗的名字是" + dog.getName() + "，年龄是" + dog.getAge() + "岁，它发出的声音是" + dog.makeSound());

        Cat cat = new Cat("咪咪", 2);
        System.out.println("猫的名字是" + cat.getName() + "，年龄是" + cat.getAge() + "岁，它发出的声音是" + cat.makeSound());
    }
}


